package org.hospital.util;

import java.math.BigDecimal;

public class DoubleUtil {

	public static double parseDoubleTwo(double aim) {
		BigDecimal bd = new BigDecimal(aim);
		return bd.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
	}

	public static void main(String[] args) {
		double a1 = 2.33333333;
		double a2 = 2.33533333;
		double a3 = 10 / 3.0;

		System.out.println(parseDoubleTwo(a1) + "," 
				+ parseDoubleTwo(a2) + "," + parseDoubleTwo(a3));
	}
}
